package com.jyx.regexp;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Regexp {

	
	public static void main(String[] args) {
		String emailMobileRegexp = "((13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8})|([a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+)";
		Pattern p = Pattern.compile(emailMobileRegexp);
		Matcher m = p.matcher("super@163.com");
		System.out.println(m.matches());
		
		String temp = "1";
		temp.matches("^[0-9]+$");
		
		
		// Pattern pattern = Pattern.compile("^((13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8})|([a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+)$");
				// Pattern pattern = Pattern.compile("^((http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&amp;:/~\\+#]*[\\w\\-\\@?^=%&amp;/~\\+#])?)|((http|ftp|https):\\/\\/)$");
				Pattern pattern = Pattern.compile("^((http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&amp;:/~\\+#]*[\\w\\-\\@?^=%&amp;/~\\+#])?)|((http|ftp|https):\\/\\/)$");
				Matcher matcher = pattern.matcher("http://");
				boolean flag = matcher.matches();
				System.out.println(flag);
				
				/*
				 * List<String> ids = new ArrayList<String>();
				ids.add("b1d5f80d216e11e6a7228038bc0bb04f");
				ids.add("3188fa31338611e6a7228038bc0bb04f");
				ids.add("bb8fc86f222211e6a7228038bc0bb04f");
				ids.add("5f5bc6f8337111e6a7228038bc0bb04f");

				
				ids.add("c7a87263338811e6a7228038bc0bb04f");
				ids.add("48ed95bc31dd11e6a7228038bc0bb04f");
				ids.add("f1632bd631e011e6a7228038bc0bb04f");
				ids.add("ded4ae99287111e6a7228038bc0bb04f");
				StringBuffer sql ;
				for (String id : ids) {
					sql = new StringBuffer();
					sql.append("INSERT INTO `mem_member_expert` (`ID`, `C_CREATE_BY`, `C_CREATE_DATE`, `C_UPDATE_BY`,  `C_UPDATE_DATE`,")
					.append(" `C_DELETE_FLAG`, `C_MEMBER_ID`,`C_DUTY`, `C_WORKING_YEARS`,  `C_STATUS`, `C_AUTH_STATUS`) ")
					.append("VALUES('")
					.append(UUID.randomUUID().toString().replaceAll("-",""))
					.append("', 'admin', sysdate(), 'admin', sysdate(), 0,'")
					.append(id)
					.append("', ' ',' ', 0,2);");
					System.out.println(sql);
					 
				}
				 */
				
				
				
				String channelCode = "10010203040506";
				int length = channelCode.length()/2-1;
				String[] channelCodes = new String[length];
				int index = 0;
				for(int i=4;i <= channelCode.length();i+=2){
					channelCodes[index] = channelCode.substring(0,i);
					index++;
				}
				for (String str : channelCodes) {
					System.out.println(str);
				}
	}
}
